package com.pz.cloud.framework.base.expection;

import com.pz.cloud.framework.base.constants.CodeContants;
import lombok.Data;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.exception.JeecgBootException;

/**
 * 用于标识自己抛出的异常
 * @author 3hmzz
 */
public class CustomRuntimeException extends JeecgBootException {

    protected Integer code = CodeContants.IINTERNAL_ERROR;
    protected String message;
    protected Object result;
    public CustomRuntimeException(Throwable cause)
    {
        super(cause);
    }

    public CustomRuntimeException(String message){
        super(message);
        this.message = message;
    }
    public CustomRuntimeException(Integer code,String message,Object result){
        super(message);
        this.code = code;
        this.message = message;
        this.result = result;
    }
    public CustomRuntimeException(Integer code,String message){
        super(message);
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Object getResult() {
        return result;
    }

    public void setResult(Object result) {
        this.result = result;
    }
}
